//-------------------------------------------------------------------------------------
function reload()  // reload logic
	{
	var timeWait = Math.floor(parseFloat(GM_getValue('r1', '6')) + parseFloat((GM_getValue('r2', '11'))-parseFloat(GM_getValue('r1', '6')))*Math.random())*1000;
//	// if we're a long way from leveling, increase timeWait to 2X the maximum selected value, not less than 5 minutes.
// this may be an issue if people are using this to keep from getting killed.
//	if (experiencetolevel > ((energy*3)+(stamina*3))*2)
//		{
//		timeWait = max(parseFloat(GM_getValue('r2','110'))*2, 300)*1000;
//		}
	var location = Math.random();
	if (location <.1)
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/pet.php"+"'", timeWait);
		}
	else if (location <.2)
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/index.php"+"'", timeWait);
		}
	else if (location <.3)
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/properties.php"+"'", timeWait);
		}
	else if (location <.4)
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/bank.php"+"'", timeWait);
		}
	else if (location <.5)
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/stats.php"+"'", timeWait);
		}
	else
		{
		reloadTimer = setTimeout("document.location = '"+"http://apps.facebook.com/"+SCRIPT.name+"/fight.php"+"'", timeWait);
		}

	}





